home *** CD-ROM | disk | FTP | other *** search
- Path: dsm6.dsmnet.com!NewsWatcher!user
- From: tfiedler@muscanet.com (Todd A. Fiedler)
- Newsgroups: comp.lang.c
- Subject: Clearing the keyboard buffer in ANSI C
- Date: 28 Jan 1996 19:39:50 GMT
- Organization: Des Moines Internet
- Message-ID: <tfiedler-2801961347210001@205.217.163.224>
- NNTP-Posting-Host: 205.217.163.224
-
- Help.
-
- I am a newbie to C and I can't figure out how to clear the keyboard buffer.
-
- I am writing a program that runs from the console and asks for user input.
- Anyway, I cannot seem to get the last newline character out of the stream
- before my next fscanf or fgets. I have tried fflush() to no avail. I have
- even tried placing "%*s" in my fscanf string to capture the errant
- newline. Still
- won't work.
-
- Any suggestions, help or comments would be *greatly* appreciated.
-
- Thanks
-
- tfiedler@muscanet.com
-